abstract class Person
{
    private String name;
    private int age;
    public Person(String name, int age)
    {
        this.setName(name);
        this.setAge(age);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    public abstract String getContent();
    public void say()
    {
        System.out.println(this.getContent());
    }
}

class Student extends Person
{
    private float score;
    public Student(String name, int age, float score)
    {
        super(name, age);
        this.setScore(score);
    }

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }
    public String getContent()
    {
        return "学生姓名：" + super.getName() + "，年龄：" + super.getAge() + "，分数：" + this.getScore();
    }
}

class Worker extends Person
{
    private float salary;
    public Worker(String name, int age, float salary)
    {
        super(name, age);
        this.setSalary(salary);
    }

    public float getSalary() {
        return salary;
    }

    public void setSalary(float salary) {
        this.salary = salary;
    }
    public String getContent()
    {
        return "工人姓名：" + super.getName() + "，年龄" + super.getAge() + "，薪水：" + this.getSalary();
    }
}

public class ZhaiZhiJie04
{
    public static void main(String[] args) {
        Person stu = new Student("zhangsan", 18, 90);
        Person wor = new Worker("lisi", 30, 10000);
        stu.say();
        wor.say();
    }
}
